<%@ page contentType="text/html; charset=utf-8" isELIgnored="false" %>  

<%@ taglib uri="/tags/struts-bean" prefix="bean"%>
<%@ taglib uri="/tags/struts-html" prefix="html"%>
<%@ taglib uri="/tags/struts-logic" prefix="logic"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%

    request.setAttribute("aa","1");
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()+ path + "/";
%>
<html>
<head>
	<base href="<%=basePath%>" />
	<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
	<title>TirePortal</title>
	<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}

.STYLE2 {
	font-size: 12px;
	font-family: "宋体";
	color: #333333;
}
-->
</style>

	<script type="text/javascript">
	 				var obj = {
	 				/**键盘按下事件*/
	 				pressKey: function(){
	 					if(event.keyCode == 13){
	 						obj.checkdata();
	 					}
	 				},
					/* 数据初始化 */
	 				init: function(){
						if(window.parent.length>0){
							window.parent.location="<%=basePath%>page/logon.jsp";
						}
	 					document.getElementById('josso_username').focus();
	 				},
	 				/* 验证用户名密码*/
	 				checkdata: function(){
	 					var user_id = document.getElementById('josso_username').value;
	 					var user_password = document.getElementById('josso_password').value;
	 					var user_yzm = document.getElementById('josso_yzm').value;
	 					if(user_id==""){
	 						alert('请输入用户帐号!!');
	 						document.getElementById('josso_username').focus();
	 						return false;
	 					}
	 					if(user_password==""){
	 						alert('请输入用户密码!!');
	 						document.getElementById('josso_password').focus();
	 						return false;
	 					}
	 					if(user_yzm==""){ 
	 					    alert('请输入验证码!!');
	 						document.getElementById('josso_yzm').focus();
	 						return false;
	 					}
	 					return true;
	 					}
			          };
			 
			 function reloadVerifyCode(){
                      var timenow = new Date().getTime();                        
                      document.getElementById("safecode").src="<%=request.getContextPath()%>/servlet/ImageServlet?d="+timenow;
                     }
		</script>

</head>

<body onLoad="obj.init()"
	background="<%=basePath%>images/mainframe/logon/3_02.jpg">
	<form name="usernamePasswordLoginForm"
		action='<%=basePath%>signon/login.shtml' method="post"
		onSubmit="javascript:return obj.checkdata();">
		<input type="hidden" name="josso_cmd" value="login">
		<div align="center">
			<table width="1000" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td width="977" height="128">
						&nbsp;
					
					</td>
				</tr>
				<tr>
					<td align="center" valign="top">
						<table width="592" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td colspan="3">
									<img src="<%=basePath%>images/goodyear.jpg" width="592"
										height="104" />
								</td>
							</tr>
							<tr>
								<!--   <td width="189" align="left" valign="top"><img src="<%=basePath%>images/mainframe/logon/3_07.jpg" width="189" height="165" /></td>
            -->
								<td width="568" align="left" valign="middle" bgcolor="#FFFFFF">
									<table width="372" height="90" border="0" cellpadding="0"
										cellspacing="6">
										<tr>
											<td width="56" rowspan="3" align="left" valign="middle">
												&nbsp;
											</td>
											<td width="56" height="22" align="left" valign="middle">
												<span class="STYLE2">用户名：</span>
												${aa}
													<c:if test="${aa=='1'}">asdsad</c:if>
											</td>
											<td height="22" colspan="2" align="left" valign="middle">
												<input name="josso_username" id="josso_username" type="text"
													class="STYLE2" size="25" />
											</td>
											<td width="97" rowspan="4" align="left" valign="center">
												<div align="center">
													<input type="image"
														src="<%=basePath%>images/mainframe/logon/dl.jpg"
														align="left" width="53" height="53" />
												</div>
											</td>
										</tr>
										<tr>
											<td height="22" align="left" valign="middle">
												<span class="STYLE2"><bean:message key="sso.label.password" />
												</span>
												<label></label>
											</td>
											<td height="22" colspan="2" align="left" valign="middle">
												<input name="josso_password" id="josso_password"
													type="password" class="STYLE2" size="25" />
											</td>
										</tr>

										<html:errors property="pwdfailed" />
										<html:errors property="userdfailed" />

									</table>
								</td>
								<td width="24" align="right" valign="top">
									<img src="<%=basePath%>images/mainframe/logon/3_09.jpg"
										width="24" height="165" />
								</td>
							</tr>
							<tr>
								<td colspan="3" align="left" valign="top">
									<img src="<%=basePath%>images/mainframe/logon/3_10.jpg"
										width="592" height="27" />
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td>
						&nbsp;
					</td>
				</tr>
			</table>
		</div>
	</form>
</body>
</html>
